home *** CD-ROM | disk | FTP | other *** search
-
- gtx.doc - (C) Copyright 1992,1993 Jaba Development
-
- TABLE OF CONTENTS
-
- gadtoolsbox.library/GTX_TagInArray
- gadtoolsbox.library/GTX_SetTagData
- gadtoolsbox.library/GTX_GetNode
- gadtoolsbox.library/GTX_GetNodeNumber
- gadtoolsbox.library/GTX_CountNodes
- gadtoolsbox.library/GTX_MoveNode
- gadtoolsbox.library/GTX_IFFErrToStr
- gadtoolsbox.library/GTX_GetHandleA
- gadtoolsbox.library/GTX_FreeHandle
- gadtoolsbox.library/GTX_RefreshWindow
- gadtoolsbox.library/GTX_CreateGadgetA
- gadtoolsbox.library/GTX_RawToVanilla
- gadtoolsbox.library/GTX_GetIMsg
- gadtoolsbox.library/GTX_ReplyIMsg
- gadtoolsbox.library/GTX_SetGadgetAttrsA
- gadtoolsbox.library/GTX_DetachLabels
- gadtoolsbox.library/GTX_DrawBox
- gadtoolsbox.library/GTX_InitTextClass
- gadtoolsbox.library/GTX_InitGetFileClass
- gadtoolsbox.library/GTX_SetHandleAttrsA
- gadtoolsbox.library/GTX_BeginRefresh
- gadtoolsbox.library/GTX_EndRefresh
- gadtoolsbox.library/GTX_FreeWindows
- gadtoolsbox.library/GTX_LoadGUIA
-
- gadtoolsbox.library/GTX_TagInArray gadtoolsbox.library/GTX_TagInArray
-
- NAME GTX_TagInArray()
-
- inarray = GTX_TagInArray( tag, taglist );
-
- BOOL GTX_TagInArray( Tag, struct TagItem * );
- D0 D0 A0
-
- FUNCTION
- To do about the same as utility.library it's TagInArray() with the
- exception that this routine will look through a TagItem array to find
- a matching Tag. Tags like TAG_MORE or TAG_IGNORE are ofcourse handled
- correctly.
-
- INPUTS
- tag - Tag value to search the TagItem array for.
- taglist - A pointer to a TAG_END terminated TagItem array.
-
- RESULT
- inarray - This is a boolean which will be TRUE if the Tag is found in
- the array and FALSE if the Tag wasn't found.
-
- BUGS
- None known.
-
- SEE ALSO
- utility.library/TagInArray()
-
- gadtoolsbox.library/GTX_SetTagData gadtoolsbox.library/SetTagData
-
- NAME GTX_SetTagData()
-
- success = GTX_SetTagData( tag, data, taglist );
-
- BOOL GTX_SetTagData( Tag, ULONG, struct TagItem * );
- D0 D0 D1 A0
-
- FUNCTION
- This does the opposite as utility.library it's GetTagData(). It searches
- through the TagItem array to find the specified Tag and then sets it's
- data field to the supplied value.
-
- INPUTS
- tag - The Tag from which to set it's data field.
- data - The data value to set in the TagItem.
- taglist - A pointer to a TAG_END terminated TagItem array.
-
- RESULT
- success - This is a boolean which will be TRUE when the Tag was found
- in the array and it's data field was set or FALSE when the
- Tag was not found in the array.
-
- BUGS
- None known.
-
- SEE ALSO
- utility.library/GetTagData()
-
- gadtoolsbox.library/GTX_GetNode gadtoolsbox.library/GTX_GetNode
-
- NAME GTX_GetNode()
-
- node = GTX_GetNode( list, nodenum );
-
- struct Node *GTX_GetNode( struct List *, ULONG );
- D0 A0 D0
-
- FUNCTION
- To get a pointer to a Node from a list. Typically this routine is used for
- getting a pointer to the selected Node of a ListView gadget.
-
- INPUTS
- list - A pointer to a List structure.
- nodenum - The ordinal number of the Node (starting from 0 for the first
- node).
-
- RESULT
- node - A pointer to the requested Node or NULL if you passed a
- wierd Node number ( Node number 11 in a list with 5 nodes..).
-
- BUGS
- None known.
-
- SEE ALSO
- exec/nodes.h, exec/lists.h
-
- gadtoolsbox.library/GTX_GetNodeNumber gadtoolsbox.library/GTX_GetNodeNumber
-
- NAME GTX_GetNodeNumber()
-
- nodenum = GTX_GetNodeNumber( list, node );
-
- LONG GTX_GetNodeNumber( struct List *, struct Node * );
- D0 A0 A1
-
- FUNCTION
- To do the opposite of GTX_GetNode(). This will return the node number of
- the Node.
-
- INPUTS
- list - A pointer to a List structure.
- node - A pointer to the Node from which you want to know it's number
-
- RESULT
- nodenum - This will be the number of the Node in the list or -1 if you
- passed a Node which is not located in the passed list.
-
- BUGS
- None know.
-
- SEE ALSO
- GTX_GetNode()
-
- gadtoolsbox.library/GTX_CountNodes gadtoolsbox.library/GTX_CountNodes
-
- NAME GTX_CountNodes()
-
- num = GTX_CountNodes( list );
-
- ULONG GTX_CountNodes( struct List * )
- D0 A0
-
- FUNCTION
- To find out how many Nodes are attached to a List.
-
- INPUTS
- list - A pointer to a List structure.
-
- RESULT
- num - The number of Nodes attached to the List.
-
- BUGS
- None known.
-
- SEE ALSO
- exec/lists.h, exec/nodes.h
-
- gadtoolsbox.library/GTX_MoveNode gadtoolsbox.library/GTX_MoveNode
-
- NAME GTX_MoveNode()
-
- success = GTX_MoveNode( list, node, direction );
-
- BOOL GTX_MoveNode( struct List *, struct Node *, WORD );
- D0 A0 A1 D0
-
- FUNCTION
- To move a Node one place up or down in a list.
-
- INPUTS
- list - A pointer to a List structure.
- node - A pointer to the node which must be moved.
- direction - The direction in which the node will be moved. When this is
- is negative the Node will be moved up (towards the List head)
- in the list. When this is positive the Node will be moved
- down (towards the List tail) in the list. When this is 0 the
- Node will not be moved and success is returned.
-
- RESULT
- success - This will be TRUE when the node was actually moved. When it
- is not moved, for example when you try to move it up whilst
- it is alread at the top of the List, this will be FALSE.
-
- BUGS
- None known.
-
- SEE ALSO
- exec/lists.h, exec/nodes.h
-
- gadtoolsbox.library/GTX_IFFErrToStr gadtoolsbox.library/GTX_IFFErrToStr
-
- NAME GTX_IFFErrToStr()
-
- string = GTX_IFFErrToStr( error, skipeof );
-
- UBYTE *GTX_IFFErrToStr( LONG, BOOL );
- D0 D0 D1
-
- FUNCTION
- To return you a pointer to a human-readable string concerning the
- iffparse.library error codes.
-
- INPUTS
- error - A signed integer containing the iffparse.library error code.
- skipeof - A boolean which must be set to TRUE if you do not wan't
- this routine to respond to IFFERR_EOF and IFFERR_EOC errors.
-
- RESULT
- string - A pointer to the error string or NULL when the error code
- did not contain a known iffparse error.
-
- BUGS
- None known.
-
- SEE ALSO
- libraries/iffparse.h
-
- gadtoolsbox.library/GTX_GetHandleA gadtoolsbox.library/GTX_GetHandleA
-
- NAME GTX_GetHandleA()
-
- handle = GTX_GetHandleA( tags )
-
- HOTKEYHANDLE GTX_GetHandleA( struct TagItem * );
- D0 A0
-
- HOTKEYHANDLE GTX_GetHandle( Tag, ... );
-
- FUNCTION
- To setup a handle for automatic gadget hotkey handling. This will return
- a HOTKEYHANDLE uppon success. This is a pointer to a private data
- structure typedef'ed to HOTKEYHANDLE in gadtoolsbox/hotkey.h. This handle
- is *extremely* important for the automatic hotkey system.
-
- INPUTS
- tags - A pointer to a TagItem chain.
-
- TAGS
- HKH_KeyMap - ( struct KeyMap * ) Create and set.
- This tag may be used to set the KeyMap to use for
- the hotkey handling. Defaults to NULL (default
- KeyMap)
- HKH_UseNewButton - ( BOOL ) Create only.
- The hotkey routines support a new button gadget.
- This new button gadget is compatible with the normal
- gadtools button except that the hotkey is handled as
- described in the User Interface Style Guide. This
- means that the gadget appears down-pressed when the
- hotkey is pressed. When TRUE is specified with this
- tag the normal button gadgets will automatically be
- replaced by the new button gadget.
- HKH_NewText - (BOOL) Create only.
- This will use the library it's text-class to produce
- the gadget texts of the gadgets created by the
- GTX_CreateGadgetA() call. The advantage, I think, is
- that it produces better underscored characters with
- fonts like topaz.
- HKH_SetRepeat - (UWORD) Create and set.
- This tag will enable you to selectively enable
- keys that are in repeat mode to affect the gadget.
- Normally the hotkeys that are in repeat mode will
- *not* affect the gadget. With this tag you can
- specify which gadgets should respond to repeated
- hotkeys. The following flags are allowed:
-
- SRF_MX - MX kind.
- SRF_CYCLE - CYCLE kind.
- SRF_SLIDER - SLIDER kind.
- SRF_SCROLLER - SCROLLER kind.
- SRF_LISTVIEW - LISTVIEW kind.
- SRF_PALETTE - PALETTE kind.
-
- When you specify SRF_SLIDER in this tag then all
- SLIDER gadgets that have a hotkey defined will
- respond to repeated keys.
-
- RESULT
- handle - This will be non-zero when the handle was successfully set
- up or NULL uppon failure. NOTE: This handle can only be
- used for *one* window.
-
- BUGS
- None known.
-
- SEE ALSO
- gadtoolsbox/hotkey.h, libraries/gadtools.h, devices/keymap.h,
- GTX_FreeHandle()
-
- gadtoolsbox.library/GTX_FreeHandle gadtoolsbox.library/GTX_FreeHandle
-
- NAME GTX_FreeHandle()
-
- GTX_FreeHandle( handle );
-
- VOID GTX_FreeHandle( HOTKEYHANDLE );
- A0
-
- FUNCTION
- To free all system resources taken by the hotkey routines. NOTE: You
- should have freed the gadgets and closed the window *before* freeing the
- handle.
-
- INPUTS
- handle - The handle that needs to be free'ed.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- GTX_GetHandle()
-
- gadtoolsbox.library/GTX_RefreshWindow gadtoolsbox.library/GTX_RefreshWindow
-
- NAME GTX_RefreshWindow()
-
- GTX_RefreshWindow( handle, window, requester );
-
- VOID GTX_RefreshWindow
- ( HOTKEYHANDLE, struct Window *, struct Requester * );
- A0 A1 A2
-
- FUNCTION
- To setup some important fields in the private HOTKEYHANDLE and then call
- gadtoolsbox.library it's GT_RefrehWindow() to refresh the gadgets. This
- call *MUST* be made right after the window was opened!
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- window - A pointer to the window to refresh.
- requester - A pointer to a requester. NOTE: gadtools does not support
- requesters yet so you *MUST* supply null here for now.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- gadtools.library/GT_RefreshWindow(), GTX_GetHandle()
-
- gadtoolsbox.library/GTX_CreateGadgetA gadtoolsbox.library/GTX_CreateGadgetA
-
- NAME GTX_CreateGadgetA()
-
- gadget = GTX_CreateGadgetA( handle, kind, pred, newgad, tags );
-
- struct Gadget *GTX_CreateGadgetA
- ( HOTKEYHANDLE, UWORD, struct Gadget *,
- A0 D0 A1
- struct NewGadget *, struct TagItem * );
- A2 A3
-
- struct Gadget * GTX_CreateGadget
- ( HOTKEYHANDLE, UWORD, struct Gadget *,
- struct NewGadget *, Tag, ... );
-
- FUNCTION
- The same as gadtools.library it's CreateGadgetA() except that it also sets
- up special information for the hotkey handling of the gadget. Also, when
- you passed the HKH_UseNewButton tag to GTX_GetHandleA(), this routine will
- create a special BUTTON gadget when a BUTTON_KIND is requested. This
- special BUTTON is compatible with the original except that the hotkey will
- work as described in the User Interface style Guide. The hotkey system
- currently only allows the following characters to be defined as hotkeys:
-
- a-z/A-Z Uppercase alpha characters are considered to be the same as
- their lowercase equivalents.
- 0-9
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- kind - See gadtools.library/CreateGadgetA().
- pred - See gadtools.library/CreateGadgetA().
- newgad - See gadtools.library/CreateGadgetA().
- tags - See gadtools.library/CreateGadgetA().
-
- RESULT
- gadget - A pointer to the created gadget or NULL uppon failure.
-
- BUGS
- None known.
-
- SEE ALSO
- gadtools.library/CreateGadgetA(), libraries/gadtools.h, GTX_GetHandle()
-
- gadtoolsbox.library/GTX_RawToVanilla() gadtoolsbox.library/GTX_RawToVanilla()
-
- NAME GTX_RawToVanilla()
-
- character = GTX_RawToVanilla( handle, code, qualifier );
-
- UBYTE GTX_RawToVanilla( HOTKEYHANDLE, UWORD, UWORD );
- D0 A0 D0 D0
-
- FUNCTION
- The usage of the hotkey stuff from this library will not allow you to use
- both the IDCMP_VANILLAKEY and IDCMP_RAWKEY at the same time. To get the raw
- messages converted into a vanilla key code you must use this routine. It
- will *only* convert keys that map to a *single* character.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- code - The code of the received RAWKEY message.
- qualifier - The qualifier of the received RAWKEY message.
-
- RESULT
- character - The converted key or 0 when the character did not map to a
- single character.
-
- BUGS
- Still needs some work.
-
- SEE ALSO
- console.device/RawKeyConvert()
-
- gadtoolsbox.library/GTX_GetIMsg() gadtoolsbox.library/GTX_GetIMsg()
-
- NAME GTX_GetIMsg()
-
- message = GTX_GetIMsg( handle, port );
-
- struct IntuiMessage *GTX_GetIMsg( HOTKEYHANDLE, struct MsgPort * );
- D0 A0 A1
-
- FUNCTION
- This is really the heart of the hotkey system. This routine will convert
- the RAWKEY messages that are assigned to a gadget into a GADGETUP or
- GADGETDOWN message. This is simply done by changing some fields in the
- IntuiMessage structure. This is how hotkeys for the specific gadget kinds
- are translated:
-
- Kind: Class: Code: IAddress:
- -----------------------------------------------------------------------
- BUTTON_KIND IDCMP_GADGETUP ----- Gadget
- CHECKBOX_KIND IDCMP_GADGETUP TRUE or FALSE Gadget
- INTEGER_KIND IDCMP_GADGETUP ----- Gadget
- LISTVIEW_KIND IDCMP_GADGETUP Selected node number Gadget
- MX_KIND IDCMP_GADGETDOWN Selected label Gadget
- CYCLE_KIND IDCMP_GADGETUP Selected label Gadget
- PALETTE_KIND IDCMP_GADGETUP Selected color Gadget
- SCROLLER_KIND IDCMP_GADGETUP Scroller top Gadget
- SLIDER_KIND IDCMP_GADGETUP Slider level Gadget
- STRING_KIND IDCMP_GADGETUP ----- Gadget
-
- As you can see the CHECKBOX_KIND also sets up the Code field, TRUE if the
- gadget is checked and FALSE if not, which eliminates having to check the
- GFLG_SELECTED bit for this kind of gadget. The gadget visuals are also
- updated utomatically. For the program that uses the hotkey system a gadget
- activated by the mouse or by the hotkey will be exactly the same.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- port - A pointer to the Window it's message port.
-
- RESULT
- message - A pointer to an IntuiMessage structure if a message was
- present at the port or NULL if not.
-
- BUGS
- None known.
-
- SEE ALSO
- gadtools.library/GT_GetIMsg(), libraries/gadtools.h, intuition/intuition.h
- GTX_ReplyIMsg()
-
- gadtoolsbox.library/GTX_ReplyIMsg() gadtoolsbox.library/GTX_ReplyIMsg()
-
- NAME GTX_ReplyIMsg()
-
- GTX_ReplyIMsg( handle, message );
-
- GTX_ReplyIMsg( HOTKEYHANDLE, struct IntuiMessage * );
- A0 A1
-
- FUNCTION
- To reply all messages gotten from the port by GTX_GetIMsg() to it's sender.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- message - The message gotten from the message port by GTX_GetIMsg().
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- gadtools.library/GT_ReplyIMsg(), intuition/intuition.h, GTX_GetIMsg()
-
- gadtoolsbox.library/GTX_SetGadgetAttrsA() gadtoolsbox.library/GTX_SetGadgetAttrsA()
-
- NAME GTX_SetGadgetAttrsA()
-
- GTX_SetGadgetAttrsA( handle, gadget, tags );
-
- GTX_SetGadgetAttrsA( HOTKEYHANDLE, struct Gadget *, struct TagItem * );
- A0 A1 A2
-
- GTX_SetGadgetAttrs( HOTKEYHANDLE, struct Gadget *, Tag, ... );
-
- FUNCTION
- A replacement call for the original gadtools.library GT_SetGadgetAttrsA()
- call. It updates some internally used data for the gadget and then call's
- the gadtools.library routine.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- gadget - A pointer to the gadget which need changing.
- tags - A pointer to a tagitem array with the new attributes for the
- gadget.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- gadtools.library/GT_SetGadgetAttrsA()
-
- gadtoolsbox.library/GTX_DetachLabels() gadtoolsbox.library/GTX_DetachLabels()
-
- NAME GTX_DetachLabels()
-
- GTX_DetachLabels( handle, gadget );
-
- GTX_DetachLabels( HOTKEYHANDLE, struct Gadget * );
-
- FUNCTION
- To detach the list from an active LISTVIEW gadget. This really is a
- shortcut to the GTX_SetGadgetAttrsA() call.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle();
- gadget - A pointer to the LISTVIEW gadget.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- GTX_SetGadgetAttrsA()
-
- gadtoolsbox.library/GTX_DrawBox() gadtoolsbox.library/GTX_DrawBox()
-
- NAME GTX_DrawBox()
-
- GTX_DrawBox( rport, left, top, width, height, drinfo, state );
-
- GTX_DrawBox( struct RastPort *, ULONG, ULONG, ULONG, ULONG,
- A0 D0 D1 D2 D3
- struct DrawInfo *, ULONG );
- A2 D4
-
- FUNCTION
- To render a bevelled box into a RastPort simular to most gadget boxes. This
- routine is used internally by the image classes provided by the library but
- it has been made visible for the people who might need it.
-
- INPUTS
- rport - A pointer to the RastPort.
- left - The box it's left edge.
- top - The box it's top edge.
- width - The box it's width.
- height - The box it's height.
- drinfo - A pointer to the DrawInfo as returned by GetScreenDrawInfo().
- state - The state in which to render the box. Currently only two
- states are supported.
-
- IDS_NORMAL - Draw a normal "raised" box with BACKGROUNDPEN
- as fill color.
- IDS_SELECTED - Draw a "recessed" box with FILLPEN as fill
- color.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- intuition.library/GetScreenDrawInfo(), intuition/screens.h,
- intuition/imageclass.h
-
- gadtoolsbox.library/GTX_InitTextClass() gadtoolsbox.library/GTX_InitTextClass()
-
- NAME GTX_InitTextClass()
-
- class = GTX_InitTextClass()
-
- struct IClass *GTX_InitTextClass( void );
- A0
-
- FUNCTION
- Initializes a private BOOPSI text imageclass for usage on custom gadgets.
-
- INPUTS
-
- RESULT
- class - A pointer to the class. This pointer must be passed onto
- NewObject() to obtain objects using this class.
-
- BUGS
- None known.
-
- SEE ALSO
- intuition.library/NewObject(), intuition/classes.h, intuition/classusr.h
- TextClass.doc
-
- gadtoolsbox.library/GTX_InitGetFileClass() gadtoolsbox.library/GTX_InitGetFileClass()
-
- NAME GTX_InitGetFileClass()
-
- class = GTX_InitGetFileClass()
-
- struct IClass *GTX_InitGetFileClass( void );
- A0
-
- FUNCTION
- Initializes a private BOOPSI getfile imageclass for usage on custom gadgets.
-
- INPUTS
-
- RESULT
- class - A pointer to the class. This pointer must be passed onto
- NewObject() to obtain objects using this class.
-
- BUGS
- None known.
-
- SEE ALSO
- intuition.library/NewObject(), intuition/classes.h, intuition/classusr.h
- GetFileClass.doc
-
- gadtoolsbox.library/GTX_SetHandleAttrsA() gadtoolsbox.library/GTX_SetHandleAttrsA()
-
- NAME GTX_SetHandleAttrsA()
-
- GTX_SetHandleAttrsA( handle, tags );
-
- GTX_SetHandleAttrsA( HOTKEYHANDLE, struct TagItem * );
- A0 A1
-
- GTX_SetHandleAttrs( HOTKEYHANDLE, Tag, ... );
-
- FUNCTION
- To change some of the attributes of the HOTKEYHANDLE.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle()
- tags - A pointer to a tagitem array containing the new attributes.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- GTX_GetHandleA()
-
- gadtoolsbox.library/GTX_BeginRefresh() gadtoolsbox.library/GTX_BeginRefresh()
-
- NAME GTX_BeginRefresh()
-
- GTX_BeginRefresh( handle );
-
- GTX_BeginRefresh( HOTKEYHANDLE );
- A0
-
- FUNCTION
- A replacement call for the gadtools.library GT_BeginRefresh() call.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- GTX_EndRefresh(), gadtools.library/GT_BeginRefresh()
-
- gadtoolsbox.library/GTX_EndRefresh() gadtoolsbox.library/GTX_EndRefresh()
-
- NAME GTX_EndRefresh()
-
- GTX_EndRefresh( handle, all );
-
- GTX_BeginRefresh( HOTKEYHANDLE, LONG );
- A0 D0
-
- FUNCTION
- A replacement call for the gadtools.library GT_EndRefresh() call.
-
- INPUTS
- handle - The handle as returned by GTX_GetHandle().
- all - See gadtools.library GT_EndRefresh().
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- GTX_BeginRefresh(), gadtools.library/GT_EndRefresh()
-
- gadtoolsbox.library/GTX_FreeWindows() gadtoolsbox.library/GTX_FreeWindows()
-
- NAME GTX_FreeWindows()
-
- GTX_FreeWindows( chain, windows );
-
- GTX_FreeWindows( struct MemoryChain *, struct WindowList * );
- A0 A1
-
- FUNCTION
- To deallocate all memory taken by the WindowList.
-
- INPUTS
- chain - A pointer to the MemoryChain in which the WindowList is
- allocated.
- windows - A pointer to the WindowList which needs to be deallocated.
-
- RESULT
-
- BUGS
- None known.
-
- SEE ALSO
- GTX_LoadGUIA()
-
- gadtoolsbox.library/GTX_LoadGUIA() gadtoolsbox.library/GTX_LoadGUIA()
-
- NAME GTX_LoadGUIA()
-
- error = GTX_LoadGUIA( chain, name, tags );
-
- LONG GTX_LoadGUIA( struct MemoryChain *, UBYTE *, struct TagItem * );
- D0 A0 A1 A2
-
- LONG GTX_LoadGUI( struct MemoryChain *, UBYTE *, Tag, ... );
-
- FUNCTION
- To read a GadToolsBox GUI file into memory. NOTE: When you want to load
- a powerpacker crunched GUI file you should make sure of two things:
-
- 1) The powerpacker.library V35 or better is available.
- 2) You have setup T: as a logical device.
-
- INPUTS
- chain - A pointer to the MemoryChain in which the GUI file will be
- allocated.
- name - A pointer to the name of the GUI file to load.
- tags - A pointer to a tagitem array.
-
- TAGS
- RG_GUI - ( GUIDATA * )
- A pointer to enough memory to hold sizeof( GUIDATA)
- bytes. The ID_GXUI chunk of the GUI file will be
- stored here. May be NULL.
-
- RG_Config - ( struct GadToolsConfig * )
- A pointer to enough memory to hold sizeof( struct
- GadToolsConfig ) bytes. The ID_GTCO chunk of the
- GUI file will be stored here. May be NULL.
-
- RG_CConfig - ( struct GenC * )
- A pointer to enough memory to hold sizeof( struct
- GenC ) bytes. The ID_GENC chunk of the GUI file
- will be stored here. May be NULL.
-
- RG_AsmConfig - ( struct GenAsm * )
- A pointer to enough memory to hold sizeof( struct
- GenAsm ) bytes. The ID_GENA chunk of the GUI file
- will be stored here. May be NULL.
-
- RG_LibGen - NOT SUPPORTED YET.
-
- RG_WindowList - ( struct WindowList * )
- A pointer to a WindowList structure in which all
- loaded windows will be appended. May be NULL.
- NOTE: The list is initialized by the library so you
- must have de-allocated any windows from a
- previous GTX_LoadGUI() call.
-
- RG_Valid - ( ULONG * )
- A pointer to an ULONG in which validation bits of
- the loaded file will be set. The following bits can
- be set in here.
-
- VLF_GUI - An ID_GGUI chunk has been loaded.
- VLF_CONFIG - An ID_GTCO chunk has been loaded.
- VLF_CCONFIG - An ID_GENC chunk has been loaded.
- VLF_ASMCONFIG - An ID_GENA chunk has been loaded.
- VLF_LIBGEN - NOT SUPPORTED YET.
- VLF_WINDOWLIST - There where windows loaded.
-
- When you load a file and the VLF_CONFIG bit is not
- set it means that there was no ID_GTCO chunk loaded.
- NOTE: Even when the loading returned an error you
- still *must* call GTX_FreeWindows() to de-
- allocate the windows when the VLF_WINDOWLIST
- flag is set!
-
- RG_PasswordEntry - ( APTR )
- This may point to a routine which will be used by
- the library to get the password from a user when a
- crypted powerpacker file is loaded. The routine
- should expect the following parameters on the stack:
-
- UBYTE *password, ULONG checksum
-
- Please read the powerpacker.library docs for some
- information on how to handle the password checking.
-
- RESULT
- error - NULL to indicate that everything is fine and any of the
- following to indicate an error:
-
- ERROR_NOMEM - Not enough memory.
- ERROR_OPEN - Could not open the file.
- ERROR_READ - Read Error.
- ERROR_WRITE - Write Error.
- ERROR_PARSE - iffparse.library error.
- ERROR_PACKER - powerpacker.library error.
- ERROR_PPLIB - The file was crunched and the
- powerpacker library V35+ failed to
- open.
- ERROR_NOTGUIFILE - The file is not a GadToolBox GUI file
-
- SEE ALSO
- powerpacker.library/ppLoadData(), gadtoolsbox/gui.h, gadtoolsbox/forms.h
- gadtoolsbox/prefs.h
-